home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / pcr / pcr4_4.lha / DIST / boot / INCLUDE / xr / xrsh.h < prev   
C/C++ Source or Header  |  1990-04-10  |  3KB  |  105 lines

  1. /* begincopyright
  2.   Copyright (c) 1988 Xerox Corporation. All rights reserved.
  3.   Use and copying of this software and preparation of derivative works based
  4.   upon this software are permitted. Any distribution of this software or
  5.   derivative works must comply with all applicable United States export
  6.   control laws. This software is made available AS IS, and Xerox Corporation
  7.   makes no warranty about the software, its performance or its conformity to
  8.   any specification. Any person obtaining a copy of this software is requested
  9.   to send their name and post office or electronic mail address to:
  10.     PCR Coordinator
  11.     Xerox PARC
  12.     3333 Coyote Hill Rd.
  13.     Palo Alto, CA
  14.   endcopyright */
  15. /* xrsh.h */
  16. /* Litman - created             30-Sep-87 14:40:39 */
  17. /* Weiser, December 3, 1988 */
  18. /* Demers, April 10, 1990 8:42:15 am PDT */
  19. /* Hauser, August 14, 1989 4:58:07 pm PDT */
  20.  
  21. /* program interface for dynamic loading */
  22. /* errors are printed to standard out */
  23.  
  24. #ifndef _XR_COMMAND_LOOP_
  25. #   include "xr/CommandLoop.h"
  26. #endif
  27.  
  28. #ifdef UNDEFINED
  29.  
  30. --> This is obsolete <--
  31.  
  32. extern void XR_call ();
  33.   /* char *function;    must be in the file last loaded */
  34.  
  35. /* Loads the file if it has not been loaded already. */
  36. /* This proc is called if you use the "DYNAMIC REQUESTS" construct in C/Mesa */ 
  37. extern void XR_request ();
  38.   /* char *file; */
  39.  
  40. typedef double (*(*CommandProc))();
  41.     /* char *restOfLine */
  42.  
  43. typedef int (*Installer_Func)();
  44.  
  45. /* Registers the command with xrsh. */
  46. extern void XR_register ();
  47.   /* char *key;     -- name of the command */
  48.   /* CommandProc proc;    -- proc to be called */
  49.   /* char *doc;        -- short blurb about the command */
  50.   /* void *clientData;    -- clientData gets passed to proc */
  51.  
  52. typedef void (*InstallFunc)();
  53.  
  54. #define MAX_CMD_LEN 256
  55. #define DBX_WAIT_TIME 5
  56.  
  57. typedef struct Reg_self {
  58.     char *key;
  59.     CommandProc proc;
  60.     char *doc;
  61.     void *clientData;
  62.     struct Reg_self *next;
  63.     char *command;
  64.     } Reg;
  65.  
  66. /*
  67.  *   Global data.
  68.  */
  69.  
  70. extern struct CMDGLOBAL {
  71. int timing_commands;
  72. char *command;
  73. int Dyload_Inited;
  74. struct XR_JmpBufRep global_jump_buf;
  75. int global_check_load;
  76. Reg *registered_cmds;
  77. char *loader_directory;
  78. char *postcmdfile;
  79. char *precmdfile;
  80. short nodotcedarboot;
  81. short NoBasicDotLoadeeCommands;
  82. short NoDBXFile;
  83. short NoDyLoad;
  84. short NoDebugger;
  85. char loader_directory_buf[128];    /* can't use malloc because of debug tool */
  86. } *XR_cmdglobal;
  87.  
  88. #define CMDGLOBAL_timing_commands (XR_cmdglobal->timing_commands)
  89. #define CMDGLOBAL_command (XR_cmdglobal->command)
  90. #define CMDGLOBAL_Dyload_Inited (XR_cmdglobal->Dyload_Inited)
  91. #define CMDGLOBAL_global_jump_buf (XR_cmdglobal->global_jump_buf)
  92. #define CMDGLOBAL_global_check_load (XR_cmdglobal->global_check_load)
  93. #define CMDGLOBAL_registered_cmds (XR_cmdglobal->registered_cmds)
  94. #define CMDGLOBAL_loader_directory (XR_cmdglobal->loader_directory)
  95. #define CMDGLOBAL_nodotxrboot (XR_cmdglobal->nodotcedarboot)
  96. #define CMDGLOBAL_NoBasicDotLoadeeCommands (XR_cmdglobal->NoBasicDotLoadeeCommands)
  97. #define CMDGLOBAL_NoDBXFile (XR_cmdglobal->NoDBXFile)
  98. #define CMDGLOBAL_NoDyLoad (XR_cmdglobal->NoDyLoad)
  99. #define CMDGLOBAL_postcmdfile (XR_cmdglobal->postcmdfile)
  100. #define CMDGLOBAL_precmdfile (XR_cmdglobal->precmdfile)
  101. #define CMDGLOBAL_NoDebugger (XR_cmdglobal->NoDebugger)
  102. #define CMDGLOBAL_loader_directory_buf (XR_cmdglobal->loader_directory_buf)
  103.  
  104. #endif /* UNDEFINED */
  105.